<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>基于express的crud</title>

    <!-- Bootstrap core CSS -->
    <link href="/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">



    <!-- Custom styles for this template -->
    <link href="/public/css/dashbord.css" rel="stylesheet">

</head>

<body>

    <div class="container-fluid" style="width:80% ;margin:50px auto">
        <h2 class="sub-header" style="text-align: center; margin-bottom: 20px;">学生信息管理</h2>
        <a href="/students/new" class="btn btn-primary btn-lg active" role="button">新增</a>
        <a href="/students/search" class="btn btn-primary btn-lg active" role="button">查询</a>
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>爱好</th>
                        <th>成绩</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    {{each students}}
                    <tr>
                        <td>{{$index +1}}</td>
                        <td>{{$value.name}}</td>
                        <td>{{$value.gender}}</td>
                        <td>{{$value.hobbies}}</td>
                        <td>{{$value.level}}</td>
                        <td>
                            <a href="/students/update?id={{$value.id}}" style="margin-right: 30px;" class="btn btn-primary btn-lg active" role="button">修改</a>
                            <a href="/students/delete?id={{$value.id}}" class="btn btn-primary btn-lg active" role="button">删除</a>
                        </td>
                    </tr>
                    {{/each}}
                </tbody>
            </table>
        </div>
    </div>
</body>

</html>